<template>
  <canvas ref="canvas" id="renderCanvas" touch-action="none"></canvas>
</template>

<script setup lang="ts">
  import { onMounted } from '@vue/runtime-core';
  import { ref } from 'vue';
  import { init } from './webgl';
  const canvas = ref(null);
  onMounted(() => {
    if (canvas.value) {
      const web3d = init(canvas.value);
      web3d.loadModels();
    }
  });
</script>
<style>
  #app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    width: 100%;
    height: 100%;
  }
  html,
  body {
    overflow: hidden;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
  }

  #renderCanvas {
    width: 100%;
    height: 100%;
    touch-action: none;
  }
</style>
